import React,{useState} from 'react'
import ComA from './ComA';
import ComB from './ComB';

function Channel() {
    // 父组件负责状态管理
    const [stateA,setStateA]=useState("A")
    const [stateB,setStateB]=useState("B")
  return (
    <div>
        <ComA stateA={stateA} setStateA={setStateA} setStateB={setStateB} />
        <ComB stateB={stateB} setStateB={setStateB} setStateA={setStateA} />
    </div>
  )
}

export default Channel